export default (listeners = {}) => {
  return {
    rules: {
      fileId: [
        { required: true, message: '文件ID不能为空', trigger: 'blur' },
      ],
      userId: [
        { required: true, message: '用户ID不能为空', trigger: 'blur' },
      ],
      operationType: [
        { required: true, message: '操作类型不能为空', trigger: 'change' },
      ],
      status: [
        { required: true, message: '状态码不能为空', trigger: 'blur' },
      ],
    },
    formItems: [
      {
        field: 'fileId',
        type: 'input',
        label: '文件ID',
        config: {
          clearable: false,
          maxlength: 30,
        },
      },
      {
        field: 'userId',
        type: 'input',
        label: '用户ID',
        config: {
          clearable: false,
          maxlength: 30,
        },
      },
      {
        field: 'operationType',
        type: 'select',
        options: [],
        label: '操作类型',
        config: {
          clearable: false,
        },
      },
      {
        field: 'status',
        type: 'input',
        label: '状态码',
        config: {
          clearable: false,
        },
      },
    ],
    colLayout: {
      xl: 12,
      lg: 12,
      md: 12,
      sm: 12,
      xs: 24,
    },
    itemStyle: {
      padding: '0px 8px 0px 8px',
    },
    elFormConfig: {
      labelWidth: '80px',
    },
    hideItems: ref([]),
  }
} 